<include file="System:leftmenu" />
<script src="__STATIC__admin/js/dragsort/jquery.dragsort-0.4.min.js"></script>
<style>
.dragli{
    padding: 1px 1px;
    font-size: 14px;
    line-height: 2em;
    border: 1px solid #eee;
	border-bottom:none;
    color: #333;
    text-align: center;
	width:623px;
}

li:last-child{border-bottom: 1px solid #eee;}

.sright,.hright {
	width:500px;
	display:inline-block;
	float:right;
	background:#efefef;
	text-align: left;
	padding-left:20px;
}

.sleft,.hleft {
	width:100px;
	display:inline-block;
}

.hright,.hleft{
	background:#999;
	color:#fff;
}

.hleft{
	padding-right:1px;
}
	

</style>

<div class="content-right fl">
	<h1 class="content-right-title">提现银行列表</h1>

		
		<div class="dragli">
				<div class="hleft">是否启用</div>
				<div class="hright">拖动排序</div>
		</div>

		<ul class="dragsort-ver">
		<?php foreach($datalist as $k=>$v){ ?>
			<li class="dragli" data-id="<?php echo $v['eid'];?>">
				<div class="sleft">
				
				<input name="ecom" type="checkbox" <?php echo $v['status'] ? "checked" : "";?> class="checkbox table-ckbs" data-id="<?php echo $v['eid'];?>">
				
				</div>
				<div class="sright"><?php echo $v['ecom_name'];?></div>
			</li>
		<?php } ?>
		</ul>


</div>


<!-- 排序保存在这里可以检索服务器上的回传 -->
<input name="list1SortOrder" type="hidden" />


<script type="text/javascript">
//拖动
$(".dragsort-ver").dragsort({
	dragSelector: "div.sright", 
	dragBetween: true, 
	dragEnd: saveOrder, 
	placeHolderTemplate: "<li class='placeHolder'><div></div></li>",
	scrollSpeed: 5
});

//点击复选框
$(".table-ckbs").click(function() {
	saveOrder();
});

//保存数据
function saveOrder() {
	var t = [];
	$(".table-ckbs:checked").each(function() {
		t.push($(this).data("id"));//找出被选中的id
	});
	if(t){
		ajaxQueit("/admin/system/bank",{"data":t});
	}
};


</script>
